<?php

namespace Controller;

class UserController {
	
	//Visar aktuell användare och hämtar data från logincontroller
	public function doControll(\Model\Database $db, \Model\UserHandler $userHandler) {
	 	
		$loginController = new LoginController();
		$userView = new \View\UserView();
		$menuView = new \View\MenuView();
		
		$user = \View\NavigationView::getCurrentUser($userHandler, $db);
		
		$out="";
		
		$out .=$userView->showDescription();
		$out .= $menuView->MovieFeedButton();
		$out .= $menuView->AddMovieButton();
		$out .= $menuView->AddFriendButton();
		
		
		$out .= $loginController->doControll($db);
		
		$out .= $userView->showUser($user);
		
		return $out;
	 }
}
